<template>
  <view class="home-cart-card">
    <card-title title="猫咪大本营" />
    <!-- 猫咪列表 -->
    <cat-list
      key="home"
      ref="catList"
    />
  </view>
</template>

<script>
import cardTitle from './card-title.vue';
import catList from './cat-list.vue';
export default {
  components: {
    cardTitle,
    catList,
  },
  mounted() {
    uni.$on('homeOnReachBottom', () => {
      this.$refs.catList.loadMore();
    });
    uni.$on('homeOnShow', () => {
      this.$refs.catList.render();
    });
  },
};
</script>

<style lang="scss">
.home-cart-card {
  margin-top: $pd;
}
</style>
